﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Data.Sql;

namespace AgNed.DAO
{
    public class DAO
    {
        public const string ConnectionString = @"Data Source=LOCALHOST\SQLEXPRESS;Initial Catalog=MyDB;Integrated Security=True;Pooling=False";


        public SqlConnection Connection;

        public SqlConnection Conn
        {
            get { return Connection; }
            set { Connection = value; }
        }

        public void Connect()
        {
            Connection = new SqlConnection(ConnectionString);
            Connection.Open();
        }

        public void Disconnect()
        {
            Connection.Close();
        }
    }
}
